package com.sunelec.pojo;

import java.util.ArrayList;
import java.util.List;

public class RelationshipExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public RelationshipExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andRelationIdIsNull() {
            addCriterion("relation_id is null");
            return (Criteria) this;
        }

        public Criteria andRelationIdIsNotNull() {
            addCriterion("relation_id is not null");
            return (Criteria) this;
        }

        public Criteria andRelationIdEqualTo(String value) {
            addCriterion("relation_id =", value, "relationId");
            return (Criteria) this;
        }

        public Criteria andRelationIdNotEqualTo(String value) {
            addCriterion("relation_id <>", value, "relationId");
            return (Criteria) this;
        }

        public Criteria andRelationIdGreaterThan(String value) {
            addCriterion("relation_id >", value, "relationId");
            return (Criteria) this;
        }

        public Criteria andRelationIdGreaterThanOrEqualTo(String value) {
            addCriterion("relation_id >=", value, "relationId");
            return (Criteria) this;
        }

        public Criteria andRelationIdLessThan(String value) {
            addCriterion("relation_id <", value, "relationId");
            return (Criteria) this;
        }

        public Criteria andRelationIdLessThanOrEqualTo(String value) {
            addCriterion("relation_id <=", value, "relationId");
            return (Criteria) this;
        }

        public Criteria andRelationIdLike(String value) {
            addCriterion("relation_id like", value, "relationId");
            return (Criteria) this;
        }

        public Criteria andRelationIdNotLike(String value) {
            addCriterion("relation_id not like", value, "relationId");
            return (Criteria) this;
        }

        public Criteria andRelationIdIn(List<String> values) {
            addCriterion("relation_id in", values, "relationId");
            return (Criteria) this;
        }

        public Criteria andRelationIdNotIn(List<String> values) {
            addCriterion("relation_id not in", values, "relationId");
            return (Criteria) this;
        }

        public Criteria andRelationIdBetween(String value1, String value2) {
            addCriterion("relation_id between", value1, value2, "relationId");
            return (Criteria) this;
        }

        public Criteria andRelationIdNotBetween(String value1, String value2) {
            addCriterion("relation_id not between", value1, value2, "relationId");
            return (Criteria) this;
        }

        public Criteria andLevel2usersIsNull() {
            addCriterion("level2users is null");
            return (Criteria) this;
        }

        public Criteria andLevel2usersIsNotNull() {
            addCriterion("level2users is not null");
            return (Criteria) this;
        }

        public Criteria andLevel2usersEqualTo(String value) {
            addCriterion("level2users =", value, "level2users");
            return (Criteria) this;
        }

        public Criteria andLevel2usersNotEqualTo(String value) {
            addCriterion("level2users <>", value, "level2users");
            return (Criteria) this;
        }

        public Criteria andLevel2usersGreaterThan(String value) {
            addCriterion("level2users >", value, "level2users");
            return (Criteria) this;
        }

        public Criteria andLevel2usersGreaterThanOrEqualTo(String value) {
            addCriterion("level2users >=", value, "level2users");
            return (Criteria) this;
        }

        public Criteria andLevel2usersLessThan(String value) {
            addCriterion("level2users <", value, "level2users");
            return (Criteria) this;
        }

        public Criteria andLevel2usersLessThanOrEqualTo(String value) {
            addCriterion("level2users <=", value, "level2users");
            return (Criteria) this;
        }

        public Criteria andLevel2usersLike(String value) {
            addCriterion("level2users like", value, "level2users");
            return (Criteria) this;
        }

        public Criteria andLevel2usersNotLike(String value) {
            addCriterion("level2users not like", value, "level2users");
            return (Criteria) this;
        }

        public Criteria andLevel2usersIn(List<String> values) {
            addCriterion("level2users in", values, "level2users");
            return (Criteria) this;
        }

        public Criteria andLevel2usersNotIn(List<String> values) {
            addCriterion("level2users not in", values, "level2users");
            return (Criteria) this;
        }

        public Criteria andLevel2usersBetween(String value1, String value2) {
            addCriterion("level2users between", value1, value2, "level2users");
            return (Criteria) this;
        }

        public Criteria andLevel2usersNotBetween(String value1, String value2) {
            addCriterion("level2users not between", value1, value2, "level2users");
            return (Criteria) this;
        }

        public Criteria andLevel3user3IsNull() {
            addCriterion("level3user3 is null");
            return (Criteria) this;
        }

        public Criteria andLevel3user3IsNotNull() {
            addCriterion("level3user3 is not null");
            return (Criteria) this;
        }

        public Criteria andLevel3user3EqualTo(String value) {
            addCriterion("level3user3 =", value, "level3user3");
            return (Criteria) this;
        }

        public Criteria andLevel3user3NotEqualTo(String value) {
            addCriterion("level3user3 <>", value, "level3user3");
            return (Criteria) this;
        }

        public Criteria andLevel3user3GreaterThan(String value) {
            addCriterion("level3user3 >", value, "level3user3");
            return (Criteria) this;
        }

        public Criteria andLevel3user3GreaterThanOrEqualTo(String value) {
            addCriterion("level3user3 >=", value, "level3user3");
            return (Criteria) this;
        }

        public Criteria andLevel3user3LessThan(String value) {
            addCriterion("level3user3 <", value, "level3user3");
            return (Criteria) this;
        }

        public Criteria andLevel3user3LessThanOrEqualTo(String value) {
            addCriterion("level3user3 <=", value, "level3user3");
            return (Criteria) this;
        }

        public Criteria andLevel3user3Like(String value) {
            addCriterion("level3user3 like", value, "level3user3");
            return (Criteria) this;
        }

        public Criteria andLevel3user3NotLike(String value) {
            addCriterion("level3user3 not like", value, "level3user3");
            return (Criteria) this;
        }

        public Criteria andLevel3user3In(List<String> values) {
            addCriterion("level3user3 in", values, "level3user3");
            return (Criteria) this;
        }

        public Criteria andLevel3user3NotIn(List<String> values) {
            addCriterion("level3user3 not in", values, "level3user3");
            return (Criteria) this;
        }

        public Criteria andLevel3user3Between(String value1, String value2) {
            addCriterion("level3user3 between", value1, value2, "level3user3");
            return (Criteria) this;
        }

        public Criteria andLevel3user3NotBetween(String value1, String value2) {
            addCriterion("level3user3 not between", value1, value2, "level3user3");
            return (Criteria) this;
        }

        public Criteria andPowerIdIsNull() {
            addCriterion("power_id is null");
            return (Criteria) this;
        }

        public Criteria andPowerIdIsNotNull() {
            addCriterion("power_id is not null");
            return (Criteria) this;
        }

        public Criteria andPowerIdEqualTo(String value) {
            addCriterion("power_id =", value, "powerId");
            return (Criteria) this;
        }

        public Criteria andPowerIdNotEqualTo(String value) {
            addCriterion("power_id <>", value, "powerId");
            return (Criteria) this;
        }

        public Criteria andPowerIdGreaterThan(String value) {
            addCriterion("power_id >", value, "powerId");
            return (Criteria) this;
        }

        public Criteria andPowerIdGreaterThanOrEqualTo(String value) {
            addCriterion("power_id >=", value, "powerId");
            return (Criteria) this;
        }

        public Criteria andPowerIdLessThan(String value) {
            addCriterion("power_id <", value, "powerId");
            return (Criteria) this;
        }

        public Criteria andPowerIdLessThanOrEqualTo(String value) {
            addCriterion("power_id <=", value, "powerId");
            return (Criteria) this;
        }

        public Criteria andPowerIdLike(String value) {
            addCriterion("power_id like", value, "powerId");
            return (Criteria) this;
        }

        public Criteria andPowerIdNotLike(String value) {
            addCriterion("power_id not like", value, "powerId");
            return (Criteria) this;
        }

        public Criteria andPowerIdIn(List<String> values) {
            addCriterion("power_id in", values, "powerId");
            return (Criteria) this;
        }

        public Criteria andPowerIdNotIn(List<String> values) {
            addCriterion("power_id not in", values, "powerId");
            return (Criteria) this;
        }

        public Criteria andPowerIdBetween(String value1, String value2) {
            addCriterion("power_id between", value1, value2, "powerId");
            return (Criteria) this;
        }

        public Criteria andPowerIdNotBetween(String value1, String value2) {
            addCriterion("power_id not between", value1, value2, "powerId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}